package com.wanxi.dangdang.service;


import com.github.pagehelper.PageInfo;
import com.wanxi.dangdang.model.pojo.Order;
import com.wanxi.dangdang.model.vo.*;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public interface OrderService {
    PageInfo findPage(Integer pageNum, Integer pageSize);

    PageInfo findDistributorOrderPage(Integer pageNum, Integer pageSize, Long storeId);

    OrderPo findById(Long id);

    String add(OrderPo orderPo);

    String payMoney(Long id);

    String updateOrderState(OrderStateVo orderStateVo);

    PageInfo findByOrderState(Integer orderState, Integer pageNum, Integer pageSize);

    Order findByOrderNumber(String orderNumber);

    void updateStatusAndAdminId(OrderStateVo orderStateVo);

    PageInfo findByAdminId(Long adminId, Integer pageNum, Integer pageSize);

    HashMap<String, Integer> findAllOrdersByDate();

    HashMap<String, BigDecimal> findPriceTotalByDate();

    PageInfo findDistributorOrderByDate(Integer pageNum, Integer pageSize, Date tripDate, Long storeId);

    Map<String, Object> findDetailsByOrderId(Long id);

    PageInfo findByStoreIdAndWeChatId(CUserAndStoreOrderVo cUserAndStoreOrderVo);

    PageInfo findByStoreIdAndWeChatIdAndStatus(CUserOrderVo cUserOrderVo);

    String refund(RefundVo refundVo);

    void autoCancelOrder(Long id);

    String cancelOrder(CancelOrderVo cancelOrderVo);

    //统计当天生成的订单数
    int countOrders(Long scenicId, Date tripDate);

    String confirmRefund(OrderStateVo orderStateVo);

    OrderPo findCOrderById(Long id, String weChatId);

    Map<String, Object> findBDetailsByOrderId(Long id, Long storeId);
}
